﻿@inject MessageService _message

<Space>
    <SpaceItem>
        <Button Type="default" OnClick="Success">
            Success
        </Button>
    </SpaceItem>
    <SpaceItem>
        <Button Type="default" OnClick="Error">
            Error
        </Button>
    </SpaceItem>
    <SpaceItem>
        <Button Type="default" OnClick="Warning">
            Warning
        </Button>
    </SpaceItem>
</Space>

@code{
    private async Task Success()
    {
        await _message.Success("This is a success message");
    }

    private async Task Error()
    {
        await _message.Error("This is an error message");

    }

    private async Task Warning()
    {
        await _message.Warning("This is a warning message");
    }
}
